package cn.chrisx.drad.admob;

import android.view.ViewGroup;

import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.MobileAds;

import cn.chrisx.drad.core.DrAdConfig;
import cn.chrisx.drad.core.DrAdPlatform;

/**
 * @author Jzfox <jz_boy@163.com>
 * @version 1.0
 * @date 2018/9/26 9:29
 * @description
 * @copyright ©2018 www.jzfox.net All rights reserved.
 */
public class AdMobAdConfig extends DrAdConfig {

    private AdSize adSize = AdSize.SMART_BANNER;

    private boolean immersiveMode;


    public AdSize getAdSize() {
        return adSize;
    }

    public AdMobAdConfig banner(ViewGroup viewGroup, AdSize adSize) {
        setAdContainer(viewGroup);
        this.adSize = adSize;
        return this;
    }

    @Override
    protected String checkPlatform() {
        return MobileAds.class.getName();
    }

    @Override
    public DrAdPlatform platform() {
        return AdMobPlatform.instance();
    }

    public boolean isImmersiveMode() {
        return immersiveMode;
    }

    public void setImmersiveMode(boolean immersiveMode) {
        this.immersiveMode = immersiveMode;
    }
}
